home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-06-26 | 1.5 KB | 41 lines | [TEXT/GEOL] |
- Item 5347844 5-May-89 20:40
-
- From: CDA0373 AUC Lakehead University
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Changing field labels|CDA0373
-
- Is it possible to change the field identifiers of an object by means of
- constants?
-
- An example is the following:
- I have a very general object, say TGeneralObj, which has as a field, say
- fGeneralField. These type definitions are contained in an interface unit, say
- UGeneralObj.p. Now I need a more specialized extension of this object.
- Moreover, in this specialized extension, people are used to using different
- names to identify the various fields. Thus to make the code more readable and
- the names more intuitive, it would be nice to employ these specialized names in
- the specialized extension.
- What I would like to do is, in the interface, USpecializedObj.p, define
-
- CONST
- fSpecializedField = fGeneralField;
- .
- .
- TYPE
- TSpecializedObj = OBJECT(TGeneralObj)
- .
- .
- .
- END;
-
- Now all new and/or OVERRIDE methods can actually use the more specialized name,
- even though they are talking about the same field.
-
- Will this work? Is it advisable? Would a user need to know anything, save
- that the fGeneralField and the fSpecializedField labels apply to the same thing
- in the specialized situation?
-
-
-